package clickhouse

import (
	"github.com/prometheus/client_golang/prometheus"
)

var clickhouseTotal = prometheus.NewCounterVec(
	prometheus.CounterOpts{
		Name: "clickhouse_total",
		Help: "Number of total",
	},
	[]string{"sql"},
)

var clickhouseDuration = prometheus.NewHistogramVec(
	prometheus.HistogramOpts{
		Name:    "clickhouse_duration_seconds",
		Help:    "clickhouse duration distribution",
		Buckets: []float64{0.01, 0.05, 0.1, 0.5, 1},
	},
	[]string{"sql"},
)

var clickhouseStats = prometheus.NewGaugeVec(
	prometheus.GaugeOpts{
		Name: "clickhouse_stats",
		Help: "database statistics",
	},
	[]string{"db", "stats"},
)

func init() {
	prometheus.MustRegister(clickhouseTotal)
	prometheus.MustRegister(clickhouseDuration)
	prometheus.MustRegister(clickhouseStats)
}
